package org.zh.svs.pro.entity;

import org.springframework.util.StringUtils;
import org.zh.client.jdbc.TCCache;
import org.zh.client.jdbc.Table;

import java.time.LocalDateTime;
import java.util.HashMap;
import java.util.Map;
import java.util.Objects;

@Table("student")
public class Student {
    /**
     * 主键ID--->int--->student_id--->int unsigned--->PRI--->auto_increment
     */
    private Long studentId;
    /**
     * 民族--->varchar--->student_ethnic_group--->varchar(20)--->--->
     */
    private String studentEthnicGroup;
    /**
     * 姓名--->varchar--->student_name--->varchar(20)--->MUL--->
     */
    private String studentName;
    /**
     * 年龄--->tinyint--->student_age--->tinyint unsigned--->MUL--->
     */
    private Integer studentAge;
    /**
     * 国籍--->varchar--->student_nationality--->varchar(20)--->--->
     */
    private String studentNationality;
    /**
     * 电话号码--->char--->student_phone_number--->char(11)--->MUL--->
     */
    private String studentPhoneNumber;
    /**
     * 性别--->set--->student_gender--->set('男','女')--->MUL--->
     */
    private String studentGender;
    /**
     * 父母信息情况--->json--->student_parents_information--->json--->--->
     */
    private String studentParentsInformation;
    /**
     * 住址--->varchar--->student_address--->varchar(100)--->--->
     */
    private String studentAddress;
    /**
     * 出生日期--->datetime--->student_birthday--->datetime--->MUL--->
     */
    private LocalDateTime studentBirthday;
    /**
     * 当前所在班级--->varchar--->student_grade_class--->varchar(30)--->MUL--->
     */
    private String studentGradeClass;

    public Long getStudentId() {
        return studentId;
    }

    public void setStudentId(Long studentId) {
        this.studentId = studentId;
    }

    public String getStudentEthnicGroup() {
        return studentEthnicGroup;
    }

    public void setStudentEthnicGroup(String studentEthnicGroup) {
        this.studentEthnicGroup = studentEthnicGroup;
    }

    public String getStudentName() {
        return studentName;
    }

    public void setStudentName(String studentName) {
        this.studentName = studentName;
    }

    public Integer getStudentAge() {
        return studentAge;
    }

    public void setStudentAge(Integer studentAge) {
        this.studentAge = studentAge;
    }

    public String getStudentNationality() {
        return studentNationality;
    }

    public void setStudentNationality(String studentNationality) {
        this.studentNationality = studentNationality;
    }

    public String getStudentPhoneNumber() {
        return studentPhoneNumber;
    }

    public void setStudentPhoneNumber(String studentPhoneNumber) {
        this.studentPhoneNumber = studentPhoneNumber;
    }

    public String getStudentGender() {
        return studentGender;
    }

    public void setStudentGender(String studentGender) {
        this.studentGender = studentGender;
    }

    public String getStudentParentsInformation() {
        return studentParentsInformation;
    }

    public void setStudentParentsInformation(String studentParentsInformation) {
        this.studentParentsInformation = studentParentsInformation;
    }

    public String getStudentAddress() {
        return studentAddress;
    }

    public void setStudentAddress(String studentAddress) {
        this.studentAddress = studentAddress;
    }

    public LocalDateTime getStudentBirthday() {
        return studentBirthday;
    }

    public void setStudentBirthday(LocalDateTime studentBirthday) {
        this.studentBirthday = studentBirthday;
    }

    public String getStudentGradeClass() {
        return studentGradeClass;
    }

    public void setStudentGradeClass(String studentGradeClass) {
        this.studentGradeClass = studentGradeClass;
    }

    @Override
    public String toString() {
        return "Student{" + "studentId=" + studentId + ", studentEthnicGroup='" + studentEthnicGroup + '\'' + ", studentName='" + studentName + '\'' + ", studentAge=" + studentAge + ", studentNationality='" + studentNationality + '\'' + ", studentPhoneNumber='" + studentPhoneNumber + '\'' + ", studentGender='" + studentGender + '\'' + ", studentParentsInformation='" + studentParentsInformation + '\'' + ", studentAddress='" + studentAddress + '\'' + ", studentBirthday=" + studentBirthday + ", studentGradeClass='" + studentGradeClass + '\'' + '}';
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;
        Student student = (Student) o;
        return Objects.equals(studentId, student.studentId) && Objects.equals(studentEthnicGroup, student.studentEthnicGroup) && Objects.equals(studentName, student.studentName) && Objects.equals(studentAge, student.studentAge) && Objects.equals(studentNationality, student.studentNationality) && Objects.equals(studentPhoneNumber, student.studentPhoneNumber) && Objects.equals(studentGender, student.studentGender) && Objects.equals(studentParentsInformation, student.studentParentsInformation) && Objects.equals(studentAddress, student.studentAddress) && Objects.equals(studentBirthday, student.studentBirthday) && Objects.equals(studentGradeClass, student.studentGradeClass);
    }

    @Override
    public int hashCode() {
        return Objects.hash(studentId, studentEthnicGroup, studentName, studentAge, studentNationality, studentPhoneNumber, studentGender, studentParentsInformation, studentAddress, studentBirthday, studentGradeClass, studentGradeClass);
    }



}